package com.baizhi.mapimpl;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

public class PropertiesDemo {
    public static void main(String[] args) throws IOException {
        Properties pro = new Properties();

        /*
            void load(InputStream inStream)
            将jdbc.properties文件加载到当前对象pro中
         */
        pro.load(new FileInputStream("javase_map\\person.properties"));

        String name = pro.getProperty("name");
        System.out.println(name);

        String age = pro.getProperty("age");
        System.out.println(age);
    }
}
